package com.eastjet.maintenance.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eastjet.maintenance.domain.SImage;
import com.eastjet.maintenance.mapper.SImageMapper;
import com.eastjet.maintenance.service.SImageService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 杨博文
 * @description 针对表【s_image(设备照片)】的数据库操作Service实现
 * @createDate 2024-11-25 09:23:39
 */
@Service
public class SImageServiceImpl extends ServiceImpl<SImageMapper, SImage>
        implements SImageService {

    /**
     * 插入设备照片
     *
     * @param image
     * @return
     */
    @Override
    public Boolean InsertImage(List<SImage> image) {
        return this.saveBatch(image);
    }

    /**
     * 删除设备照片
     *
     * @param id
     * @return
     */
    @Override
    public Boolean DeleteImage(List<String> id) {
        return this.removeByIds(id);
    }

    /**
     * 查看设备照片列表
     *
     * @param image
     * @return
     */
    public List<SImage> selectImageList(String image) {
        return this.list(new QueryWrapper<SImage>().eq("code", image));
    }
}




